import request from '@/utils/request'
import { base_url } from '@/api/config'

export function getDeviceList() {
  return request({
    url: base_url + '/device/list',
    method: 'get'
  })
}

export function addDevice(data) {
  return request({
    url: base_url + '/device/add',
    method: 'post',
    data
  })
}

export function delDevice(data) {
  return request({
    url: base_url + '/device/delete',
    method: 'post',
    data
  })
}

export function updateDevice(data) {
  return request({
    url: base_url + '/device/update',
    method: 'post',
    data
  })
}

export function getDeviceToken(data) {
  return request({
    url: base_url + '/device/token',
    method: 'post',
    data
  })
}
